home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / +look_here_1st!+ / reader_requests / zkick301 / noc0ram.asm < prev    next >
Assembly Source File  |  1997-11-28  |  860b  |  60 lines

  1. *
  2. *    Zkick V3.01 -- Copyright (C) 1991 by Daniel Zenchelsky
  3. *
  4. *        This program may be freely copied, as long as all copyright
  5. *        notices are left intact and unchanged.
  6. *
  7.  
  8.     INCLUDE 'exec/execbase.i'
  9.  
  10.     XREF _ColdReboot
  11.  
  12. SetVectors:
  13.  
  14.     move.l 4,a6
  15.     
  16.     cmp.w #33,LIB_VERSION(a6)
  17.     blt.s done
  18.     cmp.w #34,LIB_VERSION(a6)
  19.     bgt.s done
  20.     
  21.     tst.l MaxExtMem(a6)
  22.     beq.s done
  23.  
  24.     move.l MaxLocMem(a6),ChipRam
  25.  
  26.     lea ColdRoutine,a0
  27.     move.l a0,ColdCapture(a6)
  28.  
  29. ; Recalculate checksum
  30.  
  31.     lea $22(a6),a0
  32.     moveq #$16,d0
  33.     moveq #0,d1
  34. sumloop:
  35.     add.w (a0)+,d1
  36.     dbra d0,sumloop
  37.     not.w d1
  38.     move.w d1,$52(a6)
  39.  
  40.     jsr _ColdReboot
  41.  
  42. done:
  43.     moveq #0,d0
  44.     rts
  45.  
  46. ColdRoutine:
  47.  
  48.      bchg      #1,$BFE001  ; Flip the power light to bright.
  49.  
  50.     move.l #$676,A6      ; Load ExecBase into A6
  51.     move.l ChipRam,A3      ; amount of chip ram
  52.     move.l #0,A4          ; 0K of fast ram
  53.  
  54.     jmp       $FC0240
  55.  
  56. ChipRam:    dc.l 0
  57.  
  58.         END
  59.  
  60.